﻿using System;

namespace Kent.Boogaart.Gauntlet
{
	/// <summary>
	/// Defines the functionality of a log, which can be used to log information during a generation process.
	/// </summary>
	public interface ILog
	{
		/// <summary>
		/// Gets a value indicating whether verbose-level logging is enabled.
		/// </summary>
		bool IsVerboseEnabled { get; }

		/// <summary>
		/// Gets a value indicating whether information-level logging is enabled.
		/// </summary>
		bool IsInformationEnabled { get; }

		/// <summary>
		/// Gets a value indicating whether warning-level logging is enabled.
		/// </summary>
		bool IsWarningEnabled { get; }

		/// <summary>
		/// Gets a value indicating whether error-level logging is enabled.
		/// </summary>
		bool IsErrorEnabled { get; }

		/// <summary>
		/// Logs a message at verbose level.
		/// </summary>
		/// <param name="message">
		/// The message to log.
		/// </param>
		void Verbose(string message);

		/// <summary>
		/// Logs a formatted message at verbose level.
		/// </summary>
		/// <param name="format">
		/// The format string.
		/// </param>
		/// <param name="args">
		/// Arguments to the format operation.
		/// </param>
		void Verbose(string format, params object[] args);

		/// <summary>
		/// Logs a message at information level.
		/// </summary>
		/// <param name="message">
		/// The message to log.
		/// </param>
		void Information(string message);

		/// <summary>
		/// Logs a formatted message at information level.
		/// </summary>
		/// <param name="format">
		/// The format string.
		/// </param>
		/// <param name="args">
		/// Arguments to the format operation.
		/// </param>
		void Information(string format, params object[] args);

		/// <summary>
		/// Logs a message at warning level.
		/// </summary>
		/// <param name="message">
		/// The message to log.
		/// </param>
		void Warning(string message);

		/// <summary>
		/// Logs a formatted message at warning level.
		/// </summary>
		/// <param name="format">
		/// The format string.
		/// </param>
		/// <param name="args">
		/// Arguments to the format operation.
		/// </param>
		void Warning(string format, params object[] args);

		/// <summary>
		/// Logs a message at error level.
		/// </summary>
		/// <param name="message">
		/// The message to log.
		/// </param>
		void Error(string message);

		/// <summary>
		/// Logs a formatted message at error level.
		/// </summary>
		/// <param name="format">
		/// The format string.
		/// </param>
		/// <param name="args">
		/// Arguments to the format operation.
		/// </param>
		void Error(string format, params object[] args);

		/// <summary>
		/// Logs an exception.
		/// </summary>
		/// <param name="ex">
		/// The exception to log.
		/// </param>
		void Exception(Exception ex);

		/// <summary>
		/// Logs an exception along with a message.
		/// </summary>
		/// <param name="ex">
		/// The exception to log.
		/// </param>
		/// <param name="message">
		/// The message to include in the log.
		/// </param>
		void Exception(Exception ex, string message);

		/// <summary>
		/// Logs an exception along with a formatted message.
		/// </summary>
		/// <param name="ex">
		/// The exception to log.
		/// </param>
		/// <param name="format">
		/// The format string.
		/// </param>
		/// <param name="args">
		/// Arguments to the format operation.
		/// </param>
		void Exception(Exception ex, string format, params object[] args);
	}
}